import request from '@/utils/request'

// 查询参试设备列表
export function listEquipmentinfo(query) {
  return request({
    url: '/equipment/equipmentinfo/list',
    method: 'get',
    params: query
  })
}

// 查询参试设备详细
export function getEquipmentinfo(id) {
  return request({
    url: '/equipment/equipmentinfo/' + id,
    method: 'get'
  })
}

// 新增参试设备
export function addEquipmentinfo(data) {
  return request({
    url: '/equipment/equipmentinfo',
    method: 'post',
    data: data
  })
}

// 修改参试设备
export function updateEquipmentinfo(data) {
  return request({
    url: '/equipment/equipmentinfo',
    method: 'put',
    data: data
  })
}

// // 删除参试设备
// export function delEquipmentinfo(id) {
//   return request({
//     url: '/equipment/equipmentinfo/' + id,
//     method: 'delete'
//   })
// }

/* 逻辑删除 */
export function logicDelEquipmentinfo(id) {
  return request({
    url: '/equipment/equipmentinfo/' + id,
    method: 'put'
  })
}

// 申请试验
export function applyForTest(id){
  return request({
    url: '/equipment/equipmentinfo/applyForTest/' + id,
    method: 'put'
  })
}

// 出库
export function outOfStore(id){
  return request({
    url: '/equipment/equipmentinfo/outOfStore/' + id,
    method: 'put'
  })
}
//入库
export function putInStore(id){
  return request({
    url: '/equipment/equipmentinfo/putInStore/' + id,
    method: 'put'
  })
}

//提交实验结果按钮
export function resultOfTest(data){
  return request({
    url: '/equipment/equipmentinfo/resultOfTest',
    method: 'put',
    data: data
  })
}
